feature(ios/android): update plugin code to player_id and player_name #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implemented the updates in order for the plugin code to resolve with the information the app needs upon sign-in, such as information on the user (for now, player_id and player_name ... but easily can add to this!)
On the iOS side, I ended up consolidating the existing code that already was fetching this information; I just made sure it was set in the
call.resolve
On the Android side, this was a bit more tricky and did rework here in order to enhance the current signIn logic. I created callbacks for success and error for the signIn method (so we can send error information as well to the app). In the success, I called a new function that fetches
getCurrentPlayer
... which also has its own success/error callback.The information provided from that new function is sent with the
call.resolve
Note: Originally I was working with merged in changes from #14, but backed them out in order to have these changes be on their own this PR.
Type of change
General Checklist (every PR)
Please CHECK the box you took the step! Otherwise review should assume you missed it and fail the PR